package com.wn.dao;

import com.wn.entity.RbacRole;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

public interface RoleDao {
    @Insert("insert into rbac_role(name,description,status) values(#{name},#{description},#{status}) ")
    void insert(RbacRole rbacRole);

    @Select("select * from rbac_role")
    List<RbacRole> getAll();

    @Select("select * from rbac_role where id =#{id}")
    RbacRole selectId (Integer id);

    @Delete("delete from rbac_role where id =#{id}")
    void deleteId(Integer id);

    @Update("update rbac_role set name = #{name} where id = #{id} ")
    void UpdateRole(RbacRole role);
}
